package com.starview.star.operators.arith;

import com.starview.platform.data.type.IType;
import com.starview.platform.data.type.StandardTypes;
import com.starview.platform.data.type.TypeUtils;
import com.starview.star.operators.Builtin;
import com.starview.star.operators.Intrinsics;
import com.starview.star.operators.arith.runtime.LongUnary.LongAbs;
import com.starview.star.operators.arith.runtime.LongUnary.LongCbrt;
import com.starview.star.operators.arith.runtime.LongUnary.LongCeil;
import com.starview.star.operators.arith.runtime.LongUnary.LongExp;
import com.starview.star.operators.arith.runtime.LongUnary.LongFloor;
import com.starview.star.operators.arith.runtime.LongUnary.LongLog;
import com.starview.star.operators.arith.runtime.LongUnary.LongLog10;
import com.starview.star.operators.arith.runtime.LongUnary.LongRandom;
import com.starview.star.operators.arith.runtime.LongUnary.LongRound;
import com.starview.star.operators.arith.runtime.LongUnary.LongSqrt;
import com.starview.star.operators.arith.runtime.LongUnary.LongUMinus;

public abstract class LongUnary
{
  public static final String UMINUS = "__long_uminus";
  private static final IType type;

  static {
    IType longType = StandardTypes.rawLongType;
    type = TypeUtils.functionType(longType, longType);
  }

  public static void declare(Intrinsics cxt)
  {
    cxt.declareBuiltin(new Builtin("__long_abs", type, LongAbs.class));
    cxt.declareBuiltin(new Builtin(UMINUS, type, LongUMinus.class));
    cxt.declareBuiltin(new Builtin("__long_random", type, LongRandom.class));
    cxt.declareBuiltin(new Builtin("__long_sqrt", type, LongSqrt.class));
    cxt.declareBuiltin(new Builtin("__long_cbrt", type, LongCbrt.class));
    cxt.declareBuiltin(new Builtin("__long_ceil", type, LongCeil.class));
    cxt.declareBuiltin(new Builtin("__long_floor", type, LongFloor.class));
    cxt.declareBuiltin(new Builtin("__long_round", type, LongRound.class));
    cxt.declareBuiltin(new Builtin("__long_log", type, LongLog.class));
    cxt.declareBuiltin(new Builtin("__long_log10", type, LongLog10.class));
    cxt.declareBuiltin(new Builtin("__long_exp", type, LongExp.class));
  }
}
